package com.example.test.启动线程;

public class Thread1 {

    public static void main(String[] args) {

        class MyThread extends Thread {
            @Override
            public void run() {
                while (true) {
                    System.out.println("执行线程定义的方法");
                }
            }
        }

        MyThread myThread = new MyThread();
        myThread.start();

    }


}
